1. Field of the Invention
The present invention relates to an image processing device which performs processing for segmenting an image into a plurality of areas.
2. Description of the Related Art
A technique in which an area desired by a user (for example, an area corresponding to a handwritten drawing on a piece of paper shown in a captured image) is extracted from an image is known to the public. However, in some cases, the area of an image cannot be appropriately segmented with this technique due to luminance difference, brightness unevenness, and reflection over the whole image. As this type of technique for extracting an area, a technique called image segmentation is known, and there are various methods for this segmentation processing, such as Grab Cut. However, these methods are based on an assumption that an area to be extracted is specified, and therefore have a problem in that an area to be extracted is difficult to be precisely specified, and an incorrect specifying operation may create an adverse result in segmentation processing.
For this reason, there is a conventional technique in which, when a point in an extraction target area (photographic subject) in a displayed image is tapped (specified by a user), an area of a predetermined shape (such as a circular shape) including a coordinate point corresponding to the tapped point is created in the image, and the pixels of the image are segmented into background pixels and foreground pixels and the foreground portion is extracted by segmentation processing being performed with the created area as an initial area for the foreground by the use of a program of Grab Cut (refer to Japanese Patent Application Laid-Open (Kokai) Publication No. 2013-029930).
With this technique, segmentation processing can be performed simply by a portion of an extraction target being specified by a tap operation, which significantly reduces burden placed on the user. However, in a case where the extraction target has a complicated shape, it may not be entirely included in the above-described predetermined-shaped area (for example, a circular-shaped area), which may create an adverse result in the processing for segmenting the pixels of the image into background pixels and foreground pixels.
An object of the present invention is to enable an area in an image to be precisely cut out therefrom without a user's auxiliary operation for specifying the area.